/**
 * Created by Administrator on 2016/8/1.
 */
window.onload = function(){
    var tab = document.querySelector('#li');
    var tab1 = document.querySelector('#li1');
    var tab2 = document.querySelector('#li2');
    var tab3 = document.querySelector('#li3');
    var tab4 = document.querySelector('#li4');
    var xian1 = document.querySelector('#xian');
    var xian2 = document.querySelector('#xian1');
    var xian3 = document.querySelector('#xian2');
    var xian4 = document.querySelector('#xian3');
    var xian5 = document.querySelector('#xian4');
    xian1.onmouseover = function(){
        tab.style.display = 'block';
    };
    xian2.onmouseover = function(){
        tab1.style.display = 'block';
    };
    xian3.onmouseover = function(){
        tab2.style.display = 'block';
    };
    xian4.onmouseover = function(){
        tab3.style.display = 'block';
    };
    xian5.onmouseover = function(){
        tab4.style.display = 'block';
    };
    xian1.onmouseout = function(){
        tab.style.display = 'none';
    };
    xian2.onmouseout = function(){
        tab1.style.display = 'none';
    };
    xian3.onmouseout = function(){
        tab2.style.display = 'none';
    };
    xian4.onmouseout = function(){
        tab3.style.display = 'none';
    };
    xian5.onmouseout = function(){
        tab4.style.display = 'none';
    };

    var zhi = document.querySelector('.yingcang');
    var li = document.querySelector('.libian');
    window.onscroll = function() {
        if(document.body.scrollTop >= 50){
            zhi.style.display = 'block';
            zhi.style.position = 'flxed';
            li.onclick = function(){
                document.body.scrollTop = 0;
            }
            }else{
            zhi.style.display = 'none'
        }
    }

    var tan = document.querySelector('.weixin');
    var dian = document.querySelector('.weitu');

    dian.onclick = function(){
        tan.style.display = 'block';
        tan.onclick = function(){
            tan.style.display = 'none';
        }
    }
}